home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume89 / librarys / edlib.1 next >
Text File  |  1989-02-01  |  37KB  |  1,429 lines

  1. Path: xanth!ames!mailrus!ulowell!page
  2. From: page@swan.ulowell.edu (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v89i005:  edlib - manx library of useful functions
  5. Message-ID: <11495@swan.ulowell.edu>
  6. Date: 1 Feb 89 05:00:23 GMT
  7. Organization: University of Lowell, Computer Science Dept.
  8. Lines: 1418
  9. Approved: page@swan.ulowell.edu
  10.  
  11. Submitted-by: hcr!hcrvax!edwin (Edwin Hoogerbeets)
  12. Posting-number: Volume 89, Issue 5
  13. Archive-name: libraries/edlib.1
  14.  
  15. #    This is a shell archive.
  16. #    Remove everything above and including the cut line.
  17. #    Then run the rest of the file through sh.
  18. #----cut here-----cut here-----cut here-----cut here----#
  19. #!/bin/sh
  20. # shar:    Shell Archiver
  21. #    Run the following text with /bin/sh to create:
  22. #    README
  23. #    bintoint.c
  24. #    dectoint.c
  25. #    edlib.h
  26. #    getopt.c
  27. #    hextoint.c
  28. #    isbdigit.c
  29. #    iscsym.c
  30. #    iscsymf.c
  31. #    isodigit.c
  32. #    makefile
  33. #    man
  34. #    stolower.c
  35. #    stoupper.c
  36. #    strcspn.c
  37. #    stricmp.c
  38. #    strnicmp.c
  39. #    strpbrk.c
  40. #    strpos.c
  41. #    strrpbrk.c
  42. #    strrpos.c
  43. #    strspn.c
  44. #    strtok.c
  45. #    test.c
  46. #    toint.c
  47. # This archive created: Mon Jan 30 16:57:00 1989
  48. cat << \SHAR_EOF > README
  49. Edlib           copyright 1988  Edwin Hoogerbeets 
  50. Version 1.0     04/08/88
  51.  
  52. Some time ago, I noticed a lack of certain useful functions in the Manx
  53. C libraries that were mentioned in the Harbison and Steele C reference
  54. manual. So, I wrote them. Since then, I have added a few of my own as
  55. well as some from other people. Now, I think it's big enough to be
  56. useful to others, so here it is!
  57.  
  58. This is the source and executable to the edlib runtime libraries. They
  59. are for Manx 3.6a. (I have tried some of these functions with 3.4b when
  60. I used to use that and they worked fine) A makefile is included with the
  61. source. Two version of the library are provided: ed.lib for your normal
  62. programming needs and the ed32.lib for those extra special 32 bit
  63. programs.
  64.  
  65. This software collection is freely redistributable as long as no charge,
  66. other than reasonable copy fees, is levied for them.
  67.  
  68. Thanks to Daniel J. Barrett for some of these functions, and to Henry
  69. Spencer for getopt.
  70.  
  71. If you find any bugs, or have any other nifty-neato functions that you
  72. find useful, please mail them to me at:
  73.  
  74. {backbone}!utai!{utzoo,utcsri}!hcr!edwin   until September '88
  75. {backbone}!watmath!trillium!ehoogerbeets   Sept '88 to Dec '88
  76.  
  77.  
  78. ------ --------- = -------------------------------------------
  79. Edwin (Deepthot)                      Waterloo co-op student, HCR Corporation
  80. Hoogerbeets                           2A computer science and psychology
  81. utai!{utzoo,utcsri}!hcr!edwin                                Me Tarzan, Unix.
  82.                     edwin@hcr       //           Freudian slips? This message
  83. or:                                //               contains no Freudian sex.
  84. ...!hcr!MsgPort!edwin          \\ //   Amiga        Glider pilots are experts
  85. A B2000 running UUPC            \X/  Enthusiast             at keeping it up!
  86. SHAR_EOF
  87. cat << \SHAR_EOF > bintoint.c
  88. /* edlib  version 1.0 of 04/08/88 */
  89. /* this function takes a string of binary digits and returns its value */
  90. int bintoint(number)
  91. char *number;
  92. {
  93.     int value = 0;
  94.  
  95.     while ( *number )
  96.         if ( isbdigit(*number) ) {
  97.             value = (value << 1) + toint(*number++);
  98.         } else {
  99.             return(value);
  100.         }
  101.  
  102.     return(value);
  103. }
  104. SHAR_EOF
  105. cat << \SHAR_EOF > dectoint.c
  106. /* edlib  version 1.0 of 04/08/88 */
  107. /* this function takes a string of decimal digits and returns its value */
  108. #include <ctype.h>
  109.  
  110. int dectoint(number)
  111. char *number;
  112. {
  113.     int value = 0;
  114.  
  115.     while ( *number )
  116.         if ( isdigit(*number) ) {
  117.             value = value*10  + toint(*number++);
  118.         } else {
  119.             return(value);
  120.         }
  121.  
  122.     return(value);
  123. }
  124. SHAR_EOF
  125. cat << \SHAR_EOF > edlib.h
  126. /*
  127.     edlib.h Copyright 1988 Edwin Hoogerbeets
  128.  
  129.     This code may be freely redistributed as long as no cost is levied
  130.     for it and that this copyright notice remains intact.
  131.  
  132.     edlib contains a bunch of routines that are listed in H&S that are
  133.     not in the Manx libraries. Also contains other public domain as well
  134.     as freely redistributable routines.
  135.  
  136.     The library was compiled with Manx 3.6a.
  137. */
  138. #include <exec/types.h>
  139.  
  140. /* character processing functions */
  141. extern int   isbdigit();  /* is the character a `1' or a `0'? */
  142. extern int   iscsym();    /* character part of a valid C symbol? */
  143. extern int   iscsymf();   /* character valid a first char in a C symbol? */
  144. extern int   toint();     /* converts a character 0..f to its hexadecimal value */
  145. extern int   isodigit();  /* is this an octal digit? */
  146.  
  147. /* string processing functions */
  148. extern int  bintoint();   /* these three take character strings and return the */
  149. extern int  dectoint();   /* int value of the number in the string */
  150. extern int  hextoint();
  151. extern char *stoupper();  /* converts a string to entirely upper case chars */
  152. extern char *stolower();  /* converts a string to entirely lower case chars */
  153. extern int  strpos();     /* gives position of first occurance of char in string */
  154. extern int  strrpos();    /* gives position of last occurance of char in string */
  155. extern char *strrpbrk();
  156. extern int  stricmp();    /* case insensitive string compare */
  157. extern int  strnicmp();   /* " with a certain length */
  158. extern int  strcspn();
  159. extern char *strpbrk();   /* these four courtesy Daniel J. Barrett */
  160. extern char *strtok();
  161. extern int  strspn();
  162.  
  163. /* definitions to use getopt() */
  164. extern int getopt();
  165. extern char *optarg;
  166. extern int optind;
  167.  
  168.  
  169.  
  170.  
  171. SHAR_EOF
  172. cat << \SHAR_EOF > getopt.c
  173. /* edlib  version 1.0 of 04/08/88 */
  174. #define NULL    0
  175. #define EOF     (-1)
  176. #define ERR(s, c)       if(opterr){\
  177.         extern int strlen(), write();\
  178.         char errbuf[2];\
  179.         errbuf[0] = c; errbuf[1] = '\n';\
  180.         (void) write(2, argv[0], (unsigned)strlen(argv[0]));\
  181.         (void) write(2, s, (unsigned)strlen(s));\
  182.         (void) write(2, errbuf, 2);}
  183.  
  184. extern int strcmp();
  185. extern char *strchr();
  186.  
  187. int     opterr = 1;
  188. int     optind = 1;
  189. int     optopt;
  190. char    *optarg;
  191.  
  192. int
  193. getopt(argc, argv, opts)
  194. int     argc;
  195. char    **argv, *opts;
  196. {
  197.         static int sp = 1;
  198.         register int c;
  199.         register char *cp;
  200.  
  201.         if(sp == 1)
  202.                 if(optind >= argc)
  203.                         return(EOF);
  204.                 else {
  205.                     if(argv[optind][0] != '-') {
  206.                         optarg = argv[optind++];
  207.                         return(NULL);
  208.                     }
  209.                     if(strcmp(argv[optind], "--") == NULL) {
  210.                         optind++;
  211.                         return(EOF);
  212.                     }
  213.                 }
  214.         optopt = c = argv[optind][sp];
  215.         if(c == ':' || (cp=strchr(opts, c)) == NULL) {
  216.                 ERR(": illegal option -- ", c);
  217.                 if(argv[optind][++sp] == '\0') {
  218.                         optind++;
  219.                         sp = 1;
  220.                 }
  221.                 return('?');
  222.         }
  223.         if(*++cp == ':') {
  224.                 if(argv[optind][sp+1] != '\0')
  225.                         optarg = &argv[optind++][sp+1];
  226.                 else if(++optind >= argc) {
  227.                         ERR(": option requires an argument -- ", c);
  228.                         sp = 1;
  229.                         return('?');
  230.                 } else
  231.                         optarg = argv[optind++];
  232.                 sp = 1;
  233.         } else {
  234.                 if(argv[optind][++sp] == '\0') {
  235.                         sp = 1;
  236.                         optind++;
  237.                 }
  238.                 optarg = NULL;
  239.         }
  240.         return(c);
  241. }
  242. SHAR_EOF
  243. cat << \SHAR_EOF > hextoint.c
  244. /* edlib  version 1.0 of 04/08/88 */
  245. /* this function takes a string of hex digits and returns its value */
  246. #include <ctype.h>
  247.  
  248. int hextoint(number)
  249. char *number;
  250. {
  251.     int value = 0;
  252.  
  253.     while ( *number )
  254.         if ( isxdigit(*number) ) {
  255.             value = ( value << 4 )  + toint(*number++);
  256.         } else {
  257.             return(value);
  258.         }
  259.  
  260.     return(value);
  261. }
  262. SHAR_EOF
  263. cat << \SHAR_EOF > isbdigit.c
  264. /* edlib  version 1.0 of 04/08/88 */
  265. /*
  266.     tests whether the given character could be a binary digit
  267. */
  268. #include <stdio.h>
  269.  
  270. int isbdigit(c)
  271. char c;
  272. {
  273.     if ( c == '1' || c == '0' ) {
  274.         return(1);
  275.     } else {
  276.         return(NULL);
  277.     }
  278. }
  279. SHAR_EOF
  280. cat << \SHAR_EOF > iscsym.c
  281. /* edlib  version 1.0 of 04/08/88 */
  282. /*
  283.     this function returns a non-zero number if the character given
  284.     is suitable for the a character of an identifier
  285. */
  286. #include <ctype.h>
  287. #define NULL 0
  288.  
  289. int iscsym(c)
  290. char c;
  291. {
  292.     if ( iscsymf(c) || isdigit(c) )
  293.         return(c);
  294.  
  295.     return(NULL);
  296. }
  297.  
  298. SHAR_EOF
  299. cat << \SHAR_EOF > iscsymf.c
  300. /* edlib  version 1.0 of 04/08/88 */
  301. /*
  302.     iscsymf is included here because Manx for some reason does not have
  303.     it in ctype.h. tells whether or not the given character may be the
  304.     first character of a valid C symbol
  305. */
  306. #include <ctype.h>
  307. int iscsymf(c)
  308. char c;
  309. {
  310.     return( isalpha(c) || c == '_' );
  311. }
  312. SHAR_EOF
  313. cat << \SHAR_EOF > isodigit.c
  314. /* edlib  version 1.0 of 04/08/88 */
  315. /*
  316.     returns a nonzero value if c is the code for an octal digit, otherwise
  317.     return zero
  318. */
  319. #include <ctype.h>
  320.  
  321. int isodigit(c)
  322. char c;
  323. {
  324.     if (c == '9' || c == '8') {
  325.         return(0);
  326.     } else {
  327.         return(isdigit(c));
  328.     }
  329. }
  330.  
  331. SHAR_EOF
  332. cat << \SHAR_EOF > makefile
  333. # makefile for the edlib library source directory
  334. # copyright 1988 Edwin Hoogerbeets
  335. #
  336. # make sure that lb is in your path or make will give you an exec failure
  337.  
  338. .c.o:
  339.         cc +L -o $*.o $*.c
  340.  
  341. OBJS= bintoint.o dectoint.o getopt.o hextoint.o isbdigit.o \
  342.       iscsym.o iscsymf.o isodigit.o stolower.o stoupper.o  \
  343.       strcspn.o strpbrk.o strpos.o strrpos.o strspn.o      \
  344.       strtok.o toint.o strrpbrk.o stricmp.o strnicmp.o
  345.  
  346. ed32.lib: $(OBJS)
  347.         lb ed32.lib $(OBJS)
  348.  
  349. test: test.o
  350.         ln test.o -led -lc -o test
  351.  
  352. SHAR_EOF
  353. cat << \SHAR_EOF > man
  354. Here are the man pages for the library functions:
  355. This is for edlib version 1.0 04/08/88
  356.  
  357. BINTOINT(3)                Library Functions               BINTOINT(3)
  358.  
  359.  
  360.  
  361. NAME
  362.      bintoint - give the binary value of a string of binary digits
  363.  
  364. SYNOPSIS
  365.      #include <edlib.h>
  366.  
  367.      int bintoint(number)
  368.      char *number;
  369.  
  370. DESCRIPTION
  371.      Bintoint takes a string that may have been read in with scanf(3)
  372.      or from the console, and treats it as if it were a binary number.
  373.      The integer value of the binary number is returned. Bintoint
  374.      stops at the first character that is not a '1' or a '0'. If the
  375.      first character in the string is not a binary digit, then a value
  376.      of 0 is returned.
  377.  
  378. AUTHOR
  379.      Edwin Hoogerbeets 01/08/88
  380.  
  381. SEE ALSO
  382.      dectoint(3), hextoint(3), toint(3)
  383.  
  384.  
  385.  
  386. GETOPT(3)                  Library Functions                 GETOPT(3)
  387.  
  388.  
  389.  
  390. NAME
  391.      getopt - get option letter from argv
  392.  
  393. SYNOPSIS
  394.      #include <edlib.h>
  395.  
  396.      int getopt(argc, argv, optstring)
  397.      inta argc;
  398.  
  399.      char **optstring;
  400.  
  401.      extern char *optarg;
  402.      extern int optind;
  403.  
  404. DESCRIPTION
  405.      Getopt returns the next option letter in argv that matches a
  406.      letter in optstring.  Optstring is a string of recognized
  407.      option letters; if a letter is followed by a colon, the
  408.      option is expected to have an argument that may or may not
  409.      be separated from it by white space.  Optarg is set to point
  410.      to the start of the option argument on return from getopt.
  411.  
  412.      Getopt places in optind the argv index of the next argument
  413.      to be processed.  Because optind is external, it is normally
  414.      initialized to zero automatically before the first call to
  415.      getopt.
  416.  
  417.      When an option that is not in the list occurs, a NULL is
  418.      returned and the optarg pointer is set to point to the
  419.      first character of the null terminated string. This is done
  420.      so that options may be specified with other parameters
  421.      interspersed between them.
  422.  
  423. DIAGNOSTICS
  424.      Getopt prints an error message on stderr and returns a ques-
  425.      tion mark (?) when it encounters an option letter not
  426.      included in optstring.
  427.  
  428. EXAMPLE
  429.      The following code fragment shows how one might process the
  430.      arguments for a command that can take the mutually exclusive
  431.      options a and b, and the options f and o, both of which
  432.      require arguments:
  433.  
  434.           main(argc, argv)
  435.           int argc;
  436.           char **argv;
  437.           {
  438.                int c;
  439.                extern int optind;
  440.                extern char *optarg;
  441.                .
  442.                .
  443.                .
  444.                 while ((c = getopt(argc, argv, "abf:o:")) != EOF)
  445.                     switch (c) {
  446.                     case `a':
  447.                          if (bflg)
  448.                               errflg++;
  449.                          else
  450.                               aflg++;
  451.                          break;
  452.                     case `b':
  453.                          if (aflg)
  454.                               errflg++;
  455.                          else
  456.                               bproc();
  457.                          break;
  458.                     case `f':
  459.                          ifile = optarg;
  460.                          break;
  461.                     case `o':
  462.                          ofile = optarg;
  463.                          break;
  464.                     case `?':
  465.                     default:
  466.                          errflg++;
  467.                          break;
  468.                     }
  469.                if (errflg) {
  470.                     fprintf(stderr, "Usage: ...");
  471.                     exit(2);
  472.                }
  473.                for (; optind < argc; optind++) {
  474.                     .
  475.                     .
  476.                     .
  477.                }
  478.                .
  479.                .
  480.                .
  481.           }
  482.  
  483. HISTORY
  484.      Written by Henry Spencer, working from a Bell Labs manual
  485.      page.  Modified by Keith Bostic to behave more like the Sys-
  486.      tem V version. Ported to the Amiga and modified to take
  487.      options anywhere by Edwin (Deepthot) Hoogerbeets.
  488.  
  489. BUGS
  490.      It is not obvious how `-' standing alone should be treated;
  491.      this version treats it as a non-option argument, which is
  492.      not always right.
  493.  
  494.      Option arguments are allowed to begin with `-'; this is rea-
  495.      sonable but reduces the amount of error checking possible.
  496.      Getopt is quite flexible but the obvious price must be paid:
  497.      there is much it could do that it doesn't, like checking
  498.      mutually exclusive options, checking type of option argu-
  499.      ments, etc.
  500.  
  501.  
  502.  
  503.  
  504. DECTOINT(3)                Library Functions               DECTOINT(3)
  505.  
  506.  
  507.  
  508.  
  509.  
  510. NAME
  511.      dectoint - give the decimal value of a string of decimal digits
  512.  
  513. SYNOPSIS
  514.      #include <edlib.h>
  515.  
  516.      int dectoint(number)
  517.      char *number;
  518.  
  519. DESCRIPTION
  520.      Dectoint takes a string that may have been read in with scanf(3)
  521.      or from the console, and treats it as if it were a decimal number.
  522.      The integer value of the decimal number is returned. Dectoint
  523.      stops at the first character that is not a decimal digit. If the
  524.      first character in the string is not a decimal digit, then a value
  525.      of 0 is returned.
  526.  
  527. AUTHOR
  528.      Edwin Hoogerbeets 01/08/88
  529.  
  530. SEE ALSO
  531.      bintoint(3), hextoint(3), toint(3)
  532.  
  533.  
  534.  
  535. HEXTOINT(3)                Library Functions               HEXTOINT(3)
  536.  
  537.  
  538.  
  539.  
  540.  
  541. NAME
  542.      hextoint - give the decimal value of a string of decimal digits
  543.  
  544. SYNOPSIS
  545.      #include <edlib.h>
  546.  
  547.      int hextoint(number)
  548.      char *number;
  549.  
  550. DESCRIPTION
  551.      Hextoint takes a string that may have been read in with scanf(3)
  552.      or from the console, and treats it as if it were a hexadecimal
  553.      number. The integer value of the hexadecimal number is returned.
  554.      Hextoint stops at the first character that is not a hexadecimal
  555.      digit. If the first character in the string is not a hexadecimal
  556.      digit, then a value of 0 is returned.
  557.  
  558. AUTHOR
  559.      Edwin Hoogerbeets 01/08/88
  560.  
  561. SEE ALSO
  562.      bintoint(3), dectoint(3), toint(3)
  563.  
  564.  
  565.  
  566. ISBDIGIT(3)                Library Functions               ISBDIGIT(3)
  567.  
  568.  
  569.  
  570. NAME
  571.      isbdigit - tell whether given character is a binary digit
  572.  
  573. SYNOPSIS
  574.      #include <edlib.h>
  575.  
  576.      int isbdigit(c)
  577.      char c;
  578.  
  579. DESCRIPTION
  580.      Isbdigit returns a 1 if the given characters is either a '1'
  581.      or a '0'. Isbdigit returns a 0 for all other characters.
  582.  
  583. AUTHOR
  584.      Edwin Hoogerbeets 01/08/88
  585.  
  586. SEE ALSO
  587.      isdigit(3), isodigit(3), isxdigit(3)
  588.  
  589.  
  590.  
  591. ISCSYM(3)                  Library Functions                 ISCSYM(3)
  592.  
  593.  
  594.  
  595. NAME
  596.      iscsym - tell whether given character could be found in a C
  597.      symbol
  598.  
  599. SYNOPSIS
  600.      #include <edlib.h>
  601.  
  602.      int iscsym(c)
  603.      char c;
  604.  
  605. DESCRIPTION
  606.      Iscsym tells whether it is possible that the given character
  607.      could appear in a C symbol. A C symbol might be the name of a
  608.      variable, structure, reserved word or a function. Not all
  609.      characters that are valid in a C symbol may be the first
  610.      character of an identifier in most implementations of C. In
  611.      most versions, the characters allowed after the first character
  612.      are the upper and lower case alphabetic characters, the digits
  613.      '0' to '9' and the underscore (_).
  614.  
  615. AUTHOR
  616.      Edwin Hoogerbeets 01/08/88
  617.  
  618. SEE ALSO
  619.      iscsymf(3)
  620.  
  621. BUGS
  622.      This function depends on the C compiler used, and thus the
  623.      characters that are valid in a C symbol may be different, even
  624.      on the same machine.
  625.  
  626.  
  627.  
  628. ISCSYMF(3)                 Library Functions                ISCSYMF(3)
  629.  
  630.  
  631.  
  632. NAME
  633.      iscsymf - tell whether given character could be found as the
  634.      first character of a C symbol
  635.  
  636. SYNOPSIS
  637.      #include <edlib.h>
  638.  
  639.      int iscsymf(c)
  640.      char c;
  641.  
  642. DESCRIPTION
  643.      Iscsymf tells whether it is possible that the given character
  644.      could appear as the first character of a C symbol. A C symbol
  645.      might be the the name of a variable, structure, reserved word
  646.      or a functions. Not all characters that are valid in a C symbol
  647.      may be the first character of an identifier in most implementations
  648.      of C. In most versions, the characters allowed as the first
  649.      character are the upper and lower case alphbetic characters and
  650.      the underscore (_).
  651.  
  652. AUTHOR
  653.      Edwin Hoogerbeets 01/08/88
  654.  
  655. SEE ALSO
  656.      iscsym(3)
  657.  
  658. BUGS
  659.      This function depends on the C compiler used, and thus the
  660.      characters that are valid as the intial character in a C symbol
  661.      may be different, even on the same machine.
  662.  
  663.  
  664.  
  665.  
  666. ISODIGIT(3)                Library Functions               ISODIGIT(3)
  667.  
  668.  
  669.  
  670. NAME
  671.      isodigit - tell whether given character is an octal digit
  672.  
  673. SYNOPSIS
  674.      #include <edlib.h>
  675.  
  676.      int isodigit(c)
  677.      char c;
  678.  
  679. DESCRIPTION
  680.      Isodigit returns a 1 if the given characters is an octal digit.
  681.      Isodigit returns a 0 for all other characters.
  682.  
  683. AUTHOR
  684.      Edwin Hoogerbeets 01/08/88
  685.  
  686. SEE ALSO
  687.      isdigit(3), isbdigit(3), isxdigit(3)
  688.  
  689.  
  690.  
  691. STOUPPER(3)                Library Functions               STOUPPER(3)
  692.  
  693.  
  694.  
  695. NAME
  696.      stoupper - convert a string to only upper case characters
  697.  
  698. SYNOPSIS
  699.      #include <edlib.h>
  700.  
  701.      char *stoupper(str)
  702.      char *str;
  703.  
  704. DESCRIPTION
  705.      Stoupper takes a pointer to a null terminated string and
  706.      converts each lower case character into its upper case
  707.      equivalent. All other characters are left untouched.
  708.  
  709. AUTHOR
  710.      Edwin Hoogerbeets 01/08/88
  711.  
  712. SEE ALSO
  713.      stolower(3)
  714.  
  715.  
  716.  
  717. STOLOWER(3)                Library Functions               STOLOWER(3)
  718.  
  719.  
  720.  
  721. NAME
  722.      stolower - convert a string to only lower case characters
  723.  
  724. SYNOPSIS
  725.  
  726.  
  727.      char *stolower(str)
  728.      char *str;
  729.  
  730. DESCRIPTION
  731.      Stolower takes a pointer to a null terminated string and
  732.      converts each upper case character into its lower case
  733.      equivalent. All other characters are left untouched.
  734.  
  735. AUTHOR
  736.      Edwin Hoogerbeets 01/08/88
  737.  
  738. SEE ALSO
  739.      stoupper(3)
  740.  
  741.  
  742.  
  743.  
  744. STRCSPN(3)                 Library Functions                STRCSPN(3)
  745.  
  746.  
  747.  
  748. NAME
  749.      strcspn - find the length of the longest intial segment of a
  750.      string that consists of characters not from a certain set.
  751.  
  752. SYNOPSIS
  753.      #include <edlib.h>
  754.  
  755.      int strcspn(str, charset)
  756.      char *str, *charset;
  757.  
  758. DESCRIPTION
  759.      Strcspn searches the null terminated string 'str' for characters
  760.      in the set 'charset'. The length of the longest intial string
  761.      that consists of characters not from 'charset' is returned. If no
  762.      characters of 'str' are also members of 'charset', then the
  763.      length of 'str' is returned. If 'charset' is null then this
  764.      will also cause the full length of 'str' to be returned.
  765.  
  766.      This function is also known as instr.
  767.  
  768. AUTHOR
  769.      Daniel J. Barrett.
  770.      barrett@cs.jhu.edu or ins_adjb@jhunix.UUCP
  771.  
  772. SEE ALSO
  773.      strspn(3)
  774.  
  775.  
  776.  
  777. STRICMP(3)                 Library Functions                STRICMP(3)
  778.  
  779.  
  780.  
  781. NAME
  782.      stricmp - compare two strings with case insensitivity
  783.  
  784. SYNOPSIS
  785.      #include <edlib.h>
  786.  
  787.      int stricmp(str1,str2)
  788.      char *str1,*str2;
  789.  
  790. DESCRIPTION
  791.      Stricmp lexographically compares the two null terminated strings.
  792.      It returns a number less than zero if the first differing
  793.      character of str1 is less than that of str2, zero if the two
  794.      strings are equal, and a number greater than zero if the
  795.      first differing character in str1 is greater than the
  796.      corresponding character of str2. Stricmp works like strcmp(3)
  797.      except that all alphabetic characters are treated as lower case
  798.      for the purposes of the comparison.
  799.  
  800. AUTHOR
  801.      Edwin Hoogerbeets 01/08/88
  802.  
  803. SEE ALSO
  804.      strcmp(3), strncmp(3), strnicmp(3)
  805.  
  806.  
  807.  
  808. STRNICMP(3)                Library Functions               STRNICMP(3)
  809.  
  810.  
  811.  
  812. NAME
  813.      strnicmp - compare two strings with case insensitivity up to
  814.      a certain length
  815.  
  816. SYNOPSIS
  817.      #include <edlib.h>
  818.  
  819.      int strnicmp(str1,str2,len)
  820.      char *str1,*str2;
  821.      int len;
  822.  
  823. DESCRIPTION
  824.      Strnicmp lexographically compares the two null terminated
  825.      strings up to the length 'len'. It returns a number less than
  826.      zero if the first differing character of str1 is less than that
  827.      of str2, zero if the two strings are equal, and a number greater
  828.      than zero if the first differing character in str1 is greater
  829.      than the corresponding character of str2. Strnicmp works like
  830.      strncmp(3) except that all alphabetic characters are treated as
  831.      lower case for the purposes of the comparison.
  832.  
  833. AUTHOR
  834.      Edwin Hoogerbeets 01/08/88
  835.  
  836. SEE ALSO
  837.      strcmp(3), strncmp(3), stricmp(3)
  838.  
  839.  
  840.  
  841. STRPBRK(3)                 Library Functions                STRPBRK(3)
  842.  
  843.  
  844.  
  845. NAME
  846.      strpbrk - find the first occurance of a character of a set in
  847.      a string
  848.  
  849. SYNOPSIS
  850.      #include <edlib.h>
  851.  
  852.      char *strpbrk(str, charset)
  853.      char *str, *charset;
  854.  
  855. DESCRIPTION
  856.      Strpbrk searches forwards through the null terminated string
  857.      'str' for occurances of a character included in the character
  858.      set 'charset'. The 'charset' variable is null terminated string
  859.      that is treated as a character set. Therefore, repetition and
  860.      order are ignored. Strpbrk returns a pointer to the first
  861.      character of 'charset' that is found in 'str'.
  862.  
  863. DIAGNOSTICS
  864.      If no character in 'charset' is found in 'str', then a null
  865.      pointer (NULL) is returned.
  866.  
  867. AUTHOR
  868.      Daniel J. Barrett.
  869.      barrett@cs.jhu.edu or ins_adjb@jhunix.UUCP
  870.  
  871. SEE ALSO
  872.      strrpbrk(3), strcspn(3), strspn(3)
  873.  
  874.  
  875.  
  876. STRPOS(3)                  Library Functions                 STRPOS(3)
  877.  
  878.  
  879.  
  880. NAME
  881.      strpos - give the first position of a character withing a string
  882.  
  883. SYNOPSIS
  884.      #include <edlib.h>
  885.  
  886.      int strpos(string,key)
  887.      char *string;
  888.      char key;
  889.  
  890. DESCRIPTION
  891.      Strpos searches the null terminated string 'string' for the
  892.      first occurance of the character 'key'. The position of this
  893.      character is returned. The terminating null character is
  894.      considered to be part of the string for the purposes of this
  895.      search. Thus, using strpos to find the null will give the
  896.      same result as a strlen(3).
  897.  
  898.      Some implementations of C use a variant called scnstr.
  899.  
  900. DIAGNOSTICS
  901.      Strpos returns a -1 if the character is not found in the string.
  902.  
  903. AUTHOR
  904.      Edwin Hoogerbeets 01/08/88
  905.  
  906. SEE ALSO
  907.      strrpos(3)
  908.  
  909.  
  910.  
  911. STRRPBRK(3)                Library Functions               STRRPBRK(3)
  912.  
  913.  
  914.  
  915. NAME
  916.      strrpbrk - find the last occurance of a character of a set in
  917.      a string
  918.  
  919. SYNOPSIS
  920.      #include <edlib.h>
  921.  
  922.      char *strrpbrk(str, charset)
  923.      char *str, *charset;
  924.  
  925. DESCRIPTION
  926.      Strrpbrk searches backwards through the null terminated string
  927.      'str' for occurances of a character included in the character
  928.      set 'charset'. The 'charset' variable is null terminated string
  929.      that is treated as a character set. Therefore, repetition and
  930.      order are ignored. Strrpbrk returns a pointer to the last
  931.      character of 'charset' that is found in 'str'.
  932.  
  933. DIAGNOSTICS
  934.      If no character in 'charset' is found in 'str', then a null
  935.      pointer (NULL) is returned.
  936.  
  937. AUTHOR
  938.      Edwin Hoogerbeets 01/08/88 modified from strpbrk(3) by:
  939.      Daniel J. Barrett.
  940.      barrett@cs.jhu.edu or ins_adjb@jhunix.UUCP
  941.  
  942. SEE ALSO
  943.      strpbrk(3), strcspn(3), strspn(3)
  944.  
  945.  
  946.  
  947. STRRPOS(3)                 Library Functions                STRRPOS(3)
  948.  
  949.  
  950.  
  951. NAME
  952.      strrpos - give the last position of a character withing a string
  953.  
  954. SYNOPSIS
  955.      #include <edlib.h>
  956.  
  957.      int strrpos(string,key)
  958.      char *string;
  959.      char key;
  960.  
  961. DESCRIPTION
  962.      Strrpos searches the null terminated string 'string' for the
  963.      last occurance of the character 'key'. The position of this
  964.      character is returned. The terminating null character is
  965.      considered to be part of the string for the purposes of this
  966.      search. Thus, using strrpos to find the null will give the
  967.      same result as a strlen(3).
  968.  
  969. DIAGNOSTICS
  970.      Strrpos returns a -1 if the character is not found in the
  971.      string.
  972.  
  973. AUTHOR
  974.      Edwin Hoogerbeets 01/08/88
  975.  
  976. SEE ALSO
  977.      strpos(3)
  978.  
  979.  
  980.  
  981. STRSPN(3)                  Library Functions                 STRSPN(3)
  982.  
  983.  
  984.  
  985. NAME
  986.      strspn - find the length of the longest intial segment
  987.      of a string that consists of characters from a certain set.
  988.  
  989. SYNOPSIS
  990.      #include <edlib.h>
  991.  
  992.      int strspn(str, charset)
  993.      char *str, *charset;
  994.  
  995. DESCRIPTION
  996.      Strspn searches the null terminated string 'str' for characters
  997.      in the set 'charset'. The length of the longest intial string
  998.      that consists of characters from 'charset' is returned. If all
  999.      characters of 'str' are also members of 'charset', then the
  1000.      length of 'str' is returned. If 'charset' is null then this
  1001.      function will return a zero as none of the characters in 'str'
  1002.      could possibly be in the set.
  1003.  
  1004.      This function is also known as notstr.
  1005.  
  1006. AUTHOR
  1007.      Daniel J. Barrett.
  1008.      barrett@cs.jhu.edu or ins_adjb@jhunix.UUCP
  1009.  
  1010. SEE ALSO
  1011.      strcspn(3)
  1012.  
  1013.  
  1014.  
  1015. STRTOK(3)                  Library Functions                 STRTOK(3)
  1016.  
  1017.  
  1018.  
  1019. NAME
  1020.      strtok - search a string for tokens delimited by characters
  1021.      from a set
  1022.  
  1023. SYNOPSIS
  1024.      #include <edlib.h>
  1025.  
  1026.      char *strtok(buf, separators)
  1027.      char *buf, *separators;
  1028.  
  1029. DESCRIPTION
  1030.      Strtok searches the null terminated string 'buf' for tokens
  1031.      delimited by characters from the character set 'separators'.
  1032.      The null terminated string 'separators' is treated as a set.
  1033.      Thus, repetition and order are ignored. Strtok replaces the
  1034.      separator character with a null byte and returns a pointer to
  1035.      the beginning of the token, effectively singling out the first
  1036.      token. Subsequent calls to strtok with the parameter 'buf' set
  1037.      to NULL returns the next token after the previous one using the
  1038.      same string as previous invocations. The character set
  1039.      'separators' may be different at each invocation.
  1040.  
  1041. DIAGNOSTICS
  1042.      If no token is found, a NULL pointer is returned.
  1043.  
  1044. EXAMPLE
  1045.      Here is an example program demonstrating strtok(3).
  1046.  
  1047.      #include <stdio.h>
  1048.  
  1049.      extern char *strtok();
  1050.      char tokesep[] = " \n\t\rx";
  1051.  
  1052.      main()
  1053.      {
  1054.              char buf[BUFSIZ], *tokep;
  1055.  
  1056.              while (fgets(buf, sizeof(buf), stdin)) {
  1057.                      tokep = strtok(buf, tokesep);
  1058.                      do {
  1059.                              printf("Token is %s\n", tokep);
  1060.                              tokep = strtok((char *)NULL, tokesep);
  1061.                      }while (tokep);
  1062.              }
  1063.      }
  1064.  
  1065. AUTHOR
  1066.      Daniel J. Barrett.
  1067.      barrett@cs.jhu.edu or ins_adjb@jhunix.UUCP
  1068.  
  1069.  
  1070.  
  1071. TOINT(3)                   Library Functions                  TOINT(3)
  1072.  
  1073.  
  1074.  
  1075. NAME
  1076.      toint - return the hexadecimal value of a character
  1077.  
  1078. SYNOPSIS
  1079.      #include <edlib.h>
  1080.  
  1081.      int toint(c)
  1082.      char c;
  1083.  
  1084. DESCRIPTION
  1085.      Toint treats the character 'c' as a hexadecimal character and
  1086.      returns its integer equivalent.
  1087.  
  1088. DIAGNOSTICS
  1089.      
  1090.      returned.
  1091.  
  1092. AUTHOR
  1093.      Edwin Hoogerbeets 01/08/88
  1094. SHAR_EOF
  1095. cat << \SHAR_EOF > stolower.c
  1096. /* edlib  version 1.0 of 04/08/88 */
  1097. /*
  1098.     string to lower changes all upper case letters in a string to lower
  1099.     case.
  1100. */
  1101. #include <ctype.h>
  1102.  
  1103. char *stolower(str)
  1104. char *str;
  1105. {
  1106.     char *temp = str;
  1107.  
  1108.     for ( ; *temp ; temp++ )
  1109.         *temp = (char) tolower(*temp);
  1110.  
  1111.     return(str);
  1112. }
  1113. SHAR_EOF
  1114. cat << \SHAR_EOF > stoupper.c
  1115. /* edlib  version 1.0 of 04/08/88 */
  1116. /*
  1117.     string to upper changes all lower case letters in a string to upper
  1118.     case.
  1119. */
  1120. #include <ctype.h>
  1121.  
  1122. char *stoupper(str)
  1123. char *str;
  1124. {
  1125.     char *temp = str;
  1126.  
  1127.     for ( ; *temp ; temp++ )
  1128.         *temp = (char) toupper(*temp);
  1129.  
  1130.     return(str);
  1131. }
  1132. SHAR_EOF
  1133. cat << \SHAR_EOF > strcspn.c
  1134. /* edlib  version 1.0 of 04/08/88 */
  1135. /* Return the number of characters NOT from "charset" that are at the
  1136.  * BEGINNING of string "string".
  1137. */
  1138.  
  1139. int strcspn(str, charset)
  1140. char *str, *charset;
  1141. {
  1142.         char *temp = str;
  1143.  
  1144.         while (!strchr(charset, *temp))
  1145.                 ++temp;
  1146.  
  1147.         return(temp - str);
  1148. }
  1149.  
  1150. SHAR_EOF
  1151. cat << \SHAR_EOF > stricmp.c
  1152. /* edlib  version 1.0 of 04/08/88 */
  1153. #include <ctype.h>
  1154.  
  1155. int stricmp(str1,str2)
  1156. char *str1,*str2;
  1157. {
  1158.     int index = 0;
  1159.  
  1160.     while ( str1[index] && str2[index] &&
  1161.             tolower(str1[index]) == tolower(str2[index]) )
  1162.         ++index;
  1163.  
  1164.     return( (tolower(str1[index]) < tolower(str2[index])) ? -1 :
  1165.           ( (tolower(str1[index]) > tolower(str2[index])) ?  1 : 0) );
  1166. }
  1167.  
  1168. SHAR_EOF
  1169. cat << \SHAR_EOF > strnicmp.c
  1170. /* edlib  version 1.0 of 04/08/88 */
  1171. #include <ctype.h>
  1172.  
  1173. int strnicmp(str1,str2,len)
  1174. char *str1,*str2;
  1175. int len;
  1176. {
  1177.     int index = 0;
  1178.  
  1179.     while ( str1[index] && str2[index] && index < len &&
  1180.             tolower(str1[index]) == tolower(str2[index]) )
  1181.         ++index;
  1182.  
  1183.     return( (tolower(str1[index]) < tolower(str2[index])) ? -1 :
  1184.           ( (tolower(str1[index]) > tolower(str2[index])) ?  1 : 0) );
  1185. }
  1186.  
  1187. SHAR_EOF
  1188. cat << \SHAR_EOF > strpbrk.c
  1189. /* edlib  version 1.0 of 04/08/88 */
  1190. #define NULL    0L
  1191.  
  1192. char *strpbrk(str, charset)
  1193. char *str, *charset;
  1194. {
  1195.         char *temp;
  1196.         extern char *index();
  1197.  
  1198.         temp = str;
  1199.  
  1200.         while ( *temp && !index(charset, *temp) )
  1201.                 temp++;
  1202.  
  1203.         return( *temp ? temp : NULL);
  1204. }
  1205. SHAR_EOF
  1206. cat << \SHAR_EOF > strpos.c
  1207. /* edlib  version 1.0 of 04/08/88 */
  1208. /*
  1209.     strpos searches the null-terminated string string for the first
  1210.     occurance of the character "key". It returns either the position
  1211.     or EOF if it is not found.
  1212. */
  1213.  
  1214. int strpos(string,key)
  1215. char *string;
  1216. char key;
  1217. {
  1218.     int counter = 0;
  1219.  
  1220.     if ( !key )
  1221.         return(strlen(string));
  1222.  
  1223.     while (string[counter]) {
  1224.         if (string[counter] == key)
  1225.             return(counter);
  1226.         counter++;
  1227.     }
  1228.     return(-1);
  1229. }
  1230. SHAR_EOF
  1231. cat << \SHAR_EOF > strrpbrk.c
  1232. /* edlib  version 1.0 of 04/08/88 */
  1233. #define NULL    0L
  1234.  
  1235. char *strrpbrk(str, charset)
  1236. char *str, *charset;
  1237. {
  1238.         char *temp;
  1239.         extern char *index();
  1240.  
  1241.         temp = str + strlen(str) - 1;
  1242.  
  1243.         while ( temp != (str - 1)  && !index(charset, *temp) )
  1244.                 --temp;
  1245.  
  1246.         return( (temp != (str - 1)) ? temp : NULL);
  1247. }
  1248. SHAR_EOF
  1249. cat << \SHAR_EOF > strrpos.c
  1250. /* edlib  version 1.0 of 04/08/88 */
  1251. /*
  1252.     strrpos searches the null-terminated string string for the last
  1253.     occurance of the character "key". It returns either the position
  1254.     or -1 if it is not found.
  1255. */
  1256.  
  1257. int strrpos(string,key)
  1258. char *string;
  1259. char key;
  1260. {
  1261.     char *temp;
  1262.  
  1263.     if ( !key )
  1264.         return(strlen(string));
  1265.  
  1266.     for (temp = string + strlen(string) - 1; temp >= string ; temp-- )
  1267.         if ( *temp == key)
  1268.             return(temp - string);
  1269.  
  1270.     return(-1);
  1271. }
  1272. SHAR_EOF
  1273. cat << \SHAR_EOF > strspn.c
  1274. /* edlib  version 1.0 of 04/08/88 */
  1275. /* Return the number of characters from "charset" that are at the BEGINNING
  1276.  * of string "str".
  1277. */
  1278.  
  1279. int strspn(str, charset)
  1280. char *str, *charset;
  1281. {
  1282.         char *temp = str;
  1283.  
  1284.         while ( index(charset, *temp) )
  1285.                 ++temp;
  1286.  
  1287.         return(temp - str);
  1288. }
  1289. SHAR_EOF
  1290. cat << \SHAR_EOF > strtok.c
  1291. /* edlib  version 1.0 of 04/08/88 */
  1292. #define STRING_END    '\0'
  1293. #ifndef NULL
  1294. #define NULL    0L
  1295. #endif
  1296.  
  1297. char *strtok(buf, separators)
  1298. char *buf, *separators;
  1299. {
  1300.     register char *token, *end;    /* Start and end of token. */
  1301.     extern char *strpbrk();
  1302.     static char *fromLastTime;
  1303.  
  1304.     if (token = buf ? buf : fromLastTime) {
  1305.         token += strspn(token, separators);    /* Find token! */
  1306.         if (*token == STRING_END)
  1307.             return(NULL);
  1308.         fromLastTime = ((end = strpbrk(token,separators))
  1309.                 ? &end[1]
  1310.                 : NULL);
  1311.         *end = STRING_END;            /* Cut it short! */
  1312.     }
  1313.     return(token);
  1314. }
  1315. SHAR_EOF
  1316. cat << \SHAR_EOF > test.c
  1317. /* edlib  version 1.0 of 04/08/88 */
  1318. #include <stdio.h>
  1319. #include "edlib.h"
  1320. #include <ctype.h>
  1321. #include <exec/types.h>
  1322.  
  1323. char b[] = "10101";
  1324. char d[] = "12345";
  1325. char h[] = "2a";
  1326.  
  1327. char s1[] = "hey man this was in lower case.";
  1328. char s2[] = "THIS WAS ENTIRELY UPPER CASE IN THE FASHION OF IBM.";
  1329.  
  1330. char s3[] = "hey man this was in lower case.";
  1331. char s4[] = "THIS WAS ENTIRELY UPPER CASE IN THE FASHION OF IBM.";
  1332.  
  1333. main()
  1334. {
  1335.     printf("Bin: %d\n",bintoint(b));
  1336.     printf("Dec: %d\n",dectoint(d));
  1337.     printf("Hex: %d\n",hextoint(h));
  1338.  
  1339.     printf("Is 1 a bdigit? %d Is 'a'? %d\n",isbdigit('1'),isbdigit('a'));
  1340.  
  1341.     printf("iscsym: 'a' %d '_' %d '4' %d '!' %d '/' %d\n",iscsym('a'),
  1342.             iscsym('_'), iscsym('4'), iscsym('!'), iscsym('/'));
  1343.  
  1344.     printf("iscsymf: 'a' %d '_' %d '4' %d '!' %d '/' %d\n",iscsymf('a'),
  1345.             iscsymf('_'), iscsymf('4'), iscsymf('!'), iscsymf('/'));
  1346.  
  1347.     printf("isodigit: '2' %d '8' %d 'a' %d\n", isodigit('2'), isodigit('8'),
  1348.             isodigit('a'));
  1349.  
  1350.     printf("stoupper: %s\n",stoupper(s1));
  1351.     printf("stolower: %s\n",stolower(s2));
  1352.  
  1353.     printf("strcspn: '%s' '%s' gives %d\n",s3,"an",strcspn(s3,"an"));
  1354.  
  1355.     printf("stricmp: '%s' '%s' gives %d\n",s1,s3,stricmp(s1,s3));
  1356.     printf("strnicmp: '%s' '%s' 10 gives %d\n",s1,s3,strnicmp(s1,s3,10));
  1357.  
  1358.     printf("strpbrk: '%s' '%s' gives '%s'\n",s3,"a",strpbrk(s3,"a"));
  1359.  
  1360.     printf("strpos: '%s' '%c' gives %d\n",s3,'a',strpos(s3,'a'));
  1361.  
  1362.     printf("strrpbrk: '%s' '%s' gives '%s'\n",s3,"a",strrpbrk(s3,"a"));
  1363.  
  1364.     printf("strrpos: '%s' '%c' gives %d\n",s3,'a',strrpos(s3,'a'));
  1365.  
  1366.     printf("strspn: '%s' '%s' gives %d\n",s3,"ma yeh",strspn(s3,"ma yeh"));
  1367.  
  1368.     printf("strtok: '%s'\n",s3);
  1369.     printf("  tok1: '%s'\n",strtok(s3," "));
  1370.     printf("  tok2: '%s'\n",strtok(NULL," "));
  1371.     printf("  tok3: '%s'\n",strtok(NULL," "));
  1372.  
  1373.     printf("toint: '1' %d 'b' %d 'k' %d\n",toint('1'),toint('b'),toint('k'));
  1374.  
  1375.     exit(0);
  1376. }
  1377.  
  1378. /* Testing the following functions:
  1379.  
  1380.  bintoint.c                rwed     317    1  01-Aug-88 21:17:27
  1381.  dectoint.c                rwed     334    1  01-Aug-88 21:19:17
  1382.  hextoint.c                rwed     337    1  01-Aug-88 21:21:57
  1383.  isbdigit.c                rwed     236    1  23-Jun-88 22:18:41
  1384.  iscsym.c                  rwed     262    1  31-Jul-88 10:16:17
  1385.  iscsymf.c                 rwed     273    1  07-Jul-88 23:17:39
  1386.  isodigit.c                rwed     270    1  01-Aug-88 21:46:43
  1387.  stolower.c                rwed     213    1  02-Aug-88 23:08:39
  1388.  stoupper.c                rwed     213    1  01-Aug-88 21:50:24
  1389.  strcspn.c                 rwed     279    1  02-Aug-88 23:10:52
  1390.  stricmp.c                 rwed     321    1  02-Aug-88 23:30:25
  1391.  strnicmp.c                rwed     350    1  02-Aug-88 23:32:01
  1392.  strpbrk.c                 rwed     258    1  02-Aug-88 23:12:28
  1393.  strpos.c                  rwed     433    1  03-Aug-88 00:04:26
  1394.  strrpbrk.c                rwed     304    1  02-Aug-88 23:19:03
  1395.  strrpos.c                 rwed     442    1  03-Aug-88 00:09:53
  1396.  strspn.c                  rwed     270    1  02-Aug-88 23:14:16
  1397.  strtok.c                  rwed     515    2  23-Jun-88 20:38:17
  1398.  toint.c                   rwed     488    1  01-Aug-88 21:21:45
  1399.  
  1400. */
  1401.  
  1402. SHAR_EOF
  1403. cat << \SHAR_EOF > toint.c
  1404. /* edlib  version 1.0 of 04/08/88 */
  1405. /*
  1406.     toint is also not included in Manx. converts an ascii character
  1407.     into its corresponding hexadecimal value. Can be used for
  1408.     binary and decimal digits since these are subsets of the
  1409.     hexadecimal character set.
  1410. */
  1411. int toint(c)
  1412. char c;
  1413. {
  1414.     if ( c >= '0' && c <= '9') {
  1415.         return( c - '0' );
  1416.     } else if ( c >= 'a' && c <= 'f' ) {
  1417.         return( c - 'a' +10 );
  1418.     } else if ( c >= 'A' && c <= 'F' ) {
  1419.         return( c - 'A' +10 );
  1420.     } else
  1421.         return(-1);
  1422. }
  1423. SHAR_EOF
  1424. #    End of shell archive
  1425. exit 0
  1426. -- 
  1427. Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
  1428. Have five nice days.
  1429.